﻿using Mengsk.ProxyDelivery.Domain;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Mengsk.ProxyDelivery.Print.Domain.DeliveryNumberGenerator
{
    class YundaDeliveryNumberGenerator : DeliveryNumberGenerator
    {
        public override bool AcceptDeliveryCompany(string arg)
        {
            return arg.Contains("韵达");
        }

        public override string GenenrateNext(string deliveryNumberAlgorithm, string current)
        {
            if (current.Length != 13)
            {
                throw new Exception("韵达快递单号生成失败,当前快递快递单号不为13位:" + current);
            }

            long l = long.Parse(current);
            l++;
            return l.ToString();
        }

        public override string GenenrateOnline(Order order, string wuliuId)
        {
            throw new NotImplementedException();
        }

        public override void CancelOnline(WuliuNumber wuliuNumber)
        {
            throw new NotImplementedException();
        }

        public override string GenenrateWuliuId(params string[] orderIds)
        {
            throw new NotImplementedException();
        }
    }
}
